<?xml version="1.0" encoding="UTF-8" ?>
<%@ page contentType="text/xml; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="ihis.tms.client.IHISTMSClient"%>
<%@ page import="java.util.*" %>
<%@ page import="ihis.model.*" %>

<%
	String id = request.getParameter("loginId");
	
	IHISTMSClient tms = new IHISTMSClient();
	List<Member> members = tms.getUsers();
	String result ="";
	if(members == null || members.size() == 0){
		result = "<RESULT>FAIL</RESULT>";
	} else {
		for(Member member : members){
			if(member.getId().equals(id)){
				result = "<RESULT>OK</RESULT>";
				
				// 세션 만들기
				session.setAttribute("loginId", id);
				break;
			}
		}
	}	
%>
<%= result %>